<%@page import="com.mongodb.DBObject"%>
<%@page import="com.mongodb.DBCursor"%>
<%
DBCursor cursor = (DBCursor) request.getAttribute("cursor");
while(cursor.hasNext())
{
	DBObject dbObject = cursor.next();
	out.print("Regexp title  : <b>"+dbObject.get("regtitle")+"</b> ( <a href='javascript:void(0)' style='display:inline;' class='addreg' title='regtitle' rel='"+dbObject.get("regtitle")+"'>Use</a> )<br/>");
	out.print("Regexp content  : <b>"+dbObject.get("regcontent")+"</b> ( <a href='javascript:void(0)' style='display:inline;' class='addreg' title='regcontent' rel='"+dbObject.get("regcontent")+"'>Use</a> )<br/>");
	out.print("Regexp remove  : <b>"+dbObject.get("regremove")+"</b> ( <a href='javascript:void(0)' style='display:inline;' class='addreg' title='regremove' rel='"+dbObject.get("regremove")+"'>Use</a> )<br/><hr/>");
}
%>
<script type="text/javascript">
	$(document).ready(function(){
		$(".addreg").click(function(){
			$("#"+$(this).attr("title")).val($(this).attr("rel"));
		});
	});
</script>